Component({
  options: {
    multipleSlots: true // 在组件定义时的选项中启用多slot支持
  },
  properties: {
    showStatus:{
      type:String,
      value:"",
    },
    imgSrc:{
      type:String,
      value:""
    },
    tip1:{
      type:String,
      value:"数据不正常",
    },
    tip2:{
      type:String,
      value:"正在退出"
    },
    btnTip:{
      type:String,
      value:"立即退出"
    },
    disPopup:{
      type:Boolean,
      value:false,
      observer(newVal, oldVal, changedPath) {
        if(newVal) this.showDislog()
      }
    }
  },
  observers:{
    showStatus:function (newVal){
      if(newVal==="none"){
        wx.navigateBack()
      }
    }
  },
  data: {
    remainingTime:2
  },
  methods: {
    showDislog:function (){
      var interFt = setInterval(()=>{
        var remainingTime = this.data.remainingTime;
        this.setData({remainingTime:remainingTime-1})
      },1000)

      setTimeout(()=>{
        clearInterval(interFt)
        this.setData({showStatus:'none'})
      },3000)
    },
    hidePop:function (){
      this.setData({showStatus:'none'})
    }
  }
})
